package com.ourway.entity.vo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 飞书查询部门下用户返回结果
 *
 * @author lwh
 * @date 2021/11/28
 */
@NoArgsConstructor
@Data
public class FeiShuSearchUserByDeptResponseVo implements Serializable {

    private boolean has_more;
    private String page_token;
    private List<ItemsBean> items;

    @NoArgsConstructor
    @Data
    public static class ItemsBean {

        private String union_id;
        private String user_id;
        private String open_id;
        private String name;
        private String en_name;
        private String email;
        private String mobile;
        private boolean mobile_visible;
        private int gender;
        private String avatar_key;
        private AvatarBean avatar;
        private StatusBean status;
        private String leader_user_id;
        private String city;
        private String country;
        private String work_station;
        private int join_time;
        private boolean is_tenant_manager;
        private String employee_no;
        private int employee_type;
        private String enterprise_email;
        private String job_title;
        private boolean need_send_notification;
        private NotificationOptionBean notification_option;
        private boolean is_frozen;
        private List<String> department_ids;
        private List<OrdersBean> orders;
        private List<CustomAttrsBean> custom_attrs;

        @NoArgsConstructor
        @Data
        public static class AvatarBean {

            private String avatar_72;
            private String avatar_240;
            private String avatar_640;
            private String avatar_origin;
        }

        @NoArgsConstructor
        @Data
        public static class StatusBean {

            private boolean is_frozen;
            private boolean is_resigned;
            private boolean is_activated;
        }

        @NoArgsConstructor
        @Data
        public static class NotificationOptionBean {

            private String language;
            private List<String> channels;
        }

        @NoArgsConstructor
        @Data
        public static class OrdersBean {

            private String department_id;
            private int user_order;
            private int department_order;
        }

        @NoArgsConstructor
        @Data
        public static class CustomAttrsBean {

            private String type;
            private String id;
            private ValueBean value;

            @NoArgsConstructor
            @Data
            public static class ValueBean {

                private String text;
                private String url;
                private String pc_url;
                private String option_id;
                private String option_value;
                private String name;
                private String picture_url;
                private GenericUserBean generic_user;

                @NoArgsConstructor
                @Data
                public static class GenericUserBean {

                    private String id;
                    private int type;
                }
            }
        }
    }
}
